Skip to content

feat: add macro integration tests and example file - #149

Merged
thsfranca merged 1 commit into
mainfrom
feat/macro-integration
Mar 21, 2026
Merged

feat: add macro integration tests and example file#149
thsfranca merged 1 commit into
mainfrom
feat/macro-integration

Conversation

@thsfranca

Copy link
Copy Markdown
Owner

Summary

  • Add examples/macros.vx demonstrating defmacro with unless and when macros
  • Add end-to-end compilation tests in lib.rs verifying macros compile through the full pipeline (source → lex → parse → macro expand → type check → codegen → Go)
  • Add interpreter-based integration tests (defmacro_unless_via_interpreter, defmacro_when_via_interpreter, defmacro_double_via_interpreter) proving macros work through the interpreter path

Test plan

  • defmacro_unless_compiles — unless macro compiles to Go
  • defmacro_when_compiles — when macro compiles to Go
  • defmacro_stripped_from_go_output — defmacro forms absent from generated Go
  • defmacro_with_hygiene_compiles — hygiene macro compiles correctly
  • defmacro_multiple_macros_compile — multiple macros in one file
  • defmacro_example_file_compiles — examples/macros.vx compiles end-to-end
  • defmacro_unless_via_interpreter — unless macro via interpreter
  • defmacro_when_via_interpreter — when macro via interpreter
  • defmacro_double_via_interpreter — double macro via interpreter
  • All 551 project tests pass
  • cargo clippy -- -D warnings clean

Add examples/macros.vx demonstrating defmacro with unless and when
macros. Add end-to-end compilation tests in lib.rs verifying macros
compile through the full pipeline to Go. Add interpreter-based
integration tests for defmacro expansion.
@thsfranca
thsfranca enabled auto-merge (squash) March 21, 2026 21:48
@thsfranca
thsfranca merged commit b701919 into main Mar 21, 2026
2 checks passed
@thsfranca
thsfranca deleted the feat/macro-integration branch March 21, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant